package com.example.routeplansystem.entity.po;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 唐海军
 * @create 2022-07-23 15:44
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class QuestionNodePojo {
    @ApiModelProperty("ID") private Integer id;

    @ApiModelProperty("问题ID") private Integer questionId;

    @ApiModelProperty("点Id") private Integer nodeId;

    @ApiModelProperty("是否是中心点,0 不是，1 是") private Integer isCenter;

    @ApiModelProperty("点对应的需求量,默认为0") private Float demand=new Float(0);

    public QuestionNodePojo(Integer questionId, Integer nodeId){
        this.questionId=questionId;
        this.nodeId=nodeId;
        //默认不是中心点
        this.isCenter=0;
    }
    public QuestionNodePojo(Integer questionId, Integer nodeId,Integer isCenter){
        this.questionId=questionId;
        this.nodeId=nodeId;
        this.isCenter=isCenter;
    }

    public QuestionNodePojo(Integer questionId, Integer nodeId,Float demand){
        this.questionId=questionId;
        this.nodeId=nodeId;
        this.demand=demand;
    }
}
